package cn.edu.pku.ss.lbs.content;

public class Zone {
    private String id;
    private int left;
    private int right;
    private int bottom;
    private int top;

    public Zone(String id, int left, int right, int bottom, int top) {
        this.id = id;
        this.left = left;
        this.right = right;
        this.bottom = bottom;
        this.top = top;
    }

    public boolean contain(int x, int y) {
        return x >= getLeft() && x <= getRight() && y >= getBottom() && y <= getTop();
    }

    public String getId() {
        return id;
    }

    public int getLeft() {
        return left;
    }

    public int getRight() {
        return right;
    }

    public int getBottom() {
        return bottom;
    }

    public int getTop() {
        return top;
    }
}
